package com.shh.aiojbackendserver.judge.codesandbox.impl;

import com.shh.aiojbackendserver.judge.codesandbox.CodeSandbox;
import com.shh.aiojbackendserver.judge.codesandbox.JavaCodeSandboxTemplate;
import com.shh.aiojbackendserver.judge.codesandbox.model.ExecuteCodeRequest;
import com.shh.aiojbackendserver.judge.codesandbox.model.ExecuteCodeResponse;

/**
 * 示例代码沙箱
 */
public class ExampleCodeSandbox implements CodeSandbox {
    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest executeCodeRequest) {
        JavaCodeSandboxTemplate javaCodeSandboxTemplate = new JavaCodeSandboxTemplate();
        ExecuteCodeResponse executeCodeResponse = javaCodeSandboxTemplate.executeCode(executeCodeRequest);
        System.out.println(executeCodeResponse);
        return executeCodeResponse;
    }
}


